

const errorMatchMid =(error,req,res,next)=>{
    const  status = error.status || 500
    const  message = error.message || '服务器错误!!!'
    const  errors = error.errors || 'server wrong!!!'

    res.status(status)
    .json({
        code:0,
        message,
        errors
    })
}


module.exports = errorMatchMid